package com.ruoyi.common.core.domain.entity;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excels;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.xss.Xss;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

public class SysProduct extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 产品ID */
    @Excel(name = "产品序号", type = Excel.Type.EXPORT, cellType = Excel.ColumnType.NUMERIC, prompt = "产品编号")
    private Long productId;

    /** 材质ID */
    @Excel(name = "材质编号", type = Excel.Type.IMPORT)
    private Long deptId;

    /** 产品名称 */
    @Excel(name = "产品名称")
    private String productName;

    /** 产品颜色 */
    @Excel(name = "产品颜色")
    private String color;

    /** 产品参数 */
    @Excel(name = "产品参数")
    private String argument;


    /** 产品头像 */
    private String avatar;


    /** 产品状态（0正常 1停产） */
    @Excel(name = "产品状态", readConverterExp = "0=正常,1=停产")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;



    /** 部门对象 */
    @Excels({
            @Excel(name = "材质名称", targetAttr = "deptName", type = Excel.Type.EXPORT),
    })
    private SysDept dept;

    /** 用途对象 */
    private List<SysRole> purposes;

    /** 用途组 */
    private Long[] roleIds;


    /** 性能  */

    private Long[] postIds;


    private String postNames;

    public SysProduct()
    {
        dept = new SysDept();
    }


    public Long[] getPurposeIds() {
        return purposeIds;
    }

    public void setPurposeIds(Long[] purposeIds) {
        this.purposeIds = purposeIds;
    }

    public String getPurposeNames() {
        return purposeNames;
    }

    public void setPurposeNames(String purposeNames) {
        this.purposeNames = purposeNames;
    }

    private Long[] purposeIds;


    private String purposeNames;


    public String getPostNames() {
        return postNames;
    }

    public void setPostNames(String postNames) {
        this.postNames = postNames;
    }

    /** 角色ID */
    private Long roleId;


    private String productPost;

    public String getProductPost() {
        return productPost;
    }

    public void setProductPost(String productPost) {
        this.productPost = productPost;
    }

    public String getProductPurpose() {
        return productPurpose;
    }

    public void setProductPurpose(String productPurpose) {
        this.productPurpose = productPurpose;
    }

    public String productPurpose;



    public SysProduct(Long productId)
    {
        this.productId = productId;
    }

    public Long getProductId()
    {
        return productId;
    }

    public void setProductId(Long productId)
    {
        this.productId = productId;
    }


    public Long getDeptId()
    {
        return deptId;
    }

    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }

    public String getProductName()
    {
        return productName;
    }

    public void setProductName(String productName)
    {
        this.productName = productName;
    }

    public String getColor()
    {
        return color;
    }

    public void setColor(String color)
    {
        this.color = color;
    }

    public String getArgument()
    {
        return argument;
    }

    public void setArgument(String argument)
    {
        this.argument = argument;
    }

    public String getAvatar()
    {
        return avatar;
    }

    public void setAvatar(String avatar)
    {
        this.avatar = avatar;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public SysDept getDept()
    {
        return dept;
    }

    public void setDept(SysDept dept)
    {
        this.dept = dept;
    }

    public List<SysRole> getRoles()
    {
        return purposes;
    }

    public void setRoles(List<SysRole> purposes)
    {
        this.purposes = purposes;
    }

    public Long[] getRoleIds()
    {
        return roleIds;
    }

    public void setRoleIds(Long[] roleIds)
    {
        this.roleIds = roleIds;
    }

    public Long[] getPostIds()
    {
        return postIds;
    }

    public void setPostIds(Long[] postIds)
    {
        this.postIds = postIds;
    }

    public Long getRoleId()
    {
        return roleId;
    }

    public void setRoleId(Long roleId)
    {
        this.roleId = roleId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("productId", getProductId())
                .append("deptId", getDeptId())
                .append("productName", getProductName())
                .append("color", getColor())
                .append("argument", getArgument())
                .append("avatar", getAvatar())
                .append("status", getStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("dept", getDept())
                .toString();
    }
}
